<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

<ui:define name="head">
    <style type="text/css">
        .col-label {
            width: 70px;
        }

        .col-input {
            width: 120px;
        }

        .col-input-200 {
            width: 300px;
        }


    </style>
    <script language="javascript" type="text/javascript">
             function showAppInfo(source) {
                 var oAppno = source.parentNode.parentNode.childNodes[1].innerHTML;
                window.open("application_start.jsp?sendflag=1&amp;appno=" + oAppno);
            }
     </script>
</ui:define>

<ui:define name="content">
<div style="margin:5px">

<p:tabView style="font-weight:normal;font-style:normal">
<p:tab title="消费分期申请列表">
    <p:growl id="msgs" showDetail="false"/>

    <div id="table">
        <h:form id="form">
            <p:menubar>
                <p:menuitem type="push" value="全部发送" icon="ui-icon ui-icon-document"
                            action="#{writeBackCMSAction.onSendRequestAll}" update="msgs, pdt" ajax="false"/>
                <p:menuitem type="push" value="多笔发送" icon="ui-icon ui-icon-disk"
                            action="#{writeBackCMSAction.onSendRequestMulti}" update="msgs, pdt"/>
            </p:menubar>
            <p:ajaxStatus style="height:18px;text-align:center">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>
            <p:dataTable id="pdt" dynamic="true"    style="width:100%;"
                         value="#{writeBackCMSAction.requestList}" var="record"
                         selection="#{writeBackCMSAction.selectedRecords}"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true" rows="15" paginatorPosition="bottom"
                         rowsPerPageTemplate="100,50,30,15,5"
                         emptyMessage="数据记录为空...">
                <p:column selectionMode="multiple"/>

                <p:column headerText="申请单号">
                    <h:outputText value="#{record.stdsqdh}"/>
                </p:column>
                <p:column headerText="客户姓名" style="text-align: left">
                    <h:outputText value="#{record.stdkhxm}"/>
                </p:column>
                <p:column headerText="联系方式">
                    <h:outputText value="#{record.stdlxfs}">
                    </h:outputText>
                </p:column>

                <p:column headerText="商品名称" style="text-align: right">
                    <h:outputText
                            value="#{record.stdspmc}"/>
                </p:column>

                <p:column headerText="商品数量">
                    <h:outputText value="#{record.stdspsl}">
                    </h:outputText>
                </p:column>

                <p:column headerText="首付款">
                    <h:outputText value="#{record.stdsfk}">
                    </h:outputText>
                </p:column>

                  <p:column headerText="贷款总金额">
                    <h:outputText value="#{record.stddkzje}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,###.##"/>
                    </h:outputText>
                </p:column>
                <p:column headerText="贷款期限(月)" style="text-align: right">
                    <h:outputText value="#{record.stddkqx}"/>
                </p:column>

                <p:column headerText="操作" style="width:80px;text-align:center">
                     <h:commandLink  id="showAppDetail" immediate="true" value="申请单信息" onclick="showAppInfo(this);">
                    </h:commandLink>
                </p:column>
            </p:dataTable>
        </h:form>
    </div>
</p:tab>
</p:tabView>
</div>
</ui:define>

</ui:composition>